package cn.xclink.kernel.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import cn.xclink.common.entity.BaseEntity;

import com.fasterxml.jackson.annotation.JsonFormat;

@Table(name = "sys_user")
public class User extends BaseEntity {

	private static final long serialVersionUID = -2734688623832642356L;

	@Id
	@Column(name = "user_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long userId;

	private String account;

	private String username;

	private String password;

	@Column(name = "org_id")
	private Long orgId;

	private String email;

	private String phone;

	private String salt;

	private String available;

	@Column(name = "create_by")
	private Long createBy;

	@Column(name = "last_update_by")
	private Long lastUpdateBy;

	@Column(name = "create_time")
	private Date createTime;

	@Column(name = "last_update_time")
	private Date lastUpdateTime;

	@Transient
	private Long[] orgIds;
	
	@Transient
	private Long[] roleIds;
	
	@Transient
	private Long roleId;
	
	@Transient
	private String orgName;
	
	@Transient
	private Long orgCode;
	
	
	@Column(name = "cust_text_01")
    private String custText01;

    @Column(name = "cust_text_02")
    private String custText02;

    @Column(name = "cust_text_03")
    private String custText03;

    @Column(name = "cust_text_04")
    private String custText04;

    @Column(name = "cust_text_05")
    private String custText05;

    @Column(name = "cust_text_06")
    private String custText06;

    @Column(name = "cust_text_07")
    private String custText07;

    @Column(name = "cust_text_08")
    private String custText08;

    @Column(name = "cust_text_09")
    private String custText09;

    @Column(name = "cust_text_10")
    private String custText10;

    @Column(name = "cust_text_11")
    private String custText11;

    @Column(name = "cust_text_12")
    private String custText12;

    @Column(name = "cust_text_13")
    private String custText13;

    @Column(name = "cust_text_14")
    private String custText14;

    @Column(name = "cust_text_15")
    private String custText15;

    @Column(name = "cust_text_16")
    private String custText16;

    @Column(name = "cust_text_17")
    private String custText17;

    @Column(name = "cust_text_18")
    private String custText18;

    @Column(name = "cust_text_19")
    private String custText19;

    @Column(name = "cust_text_20")
    private String custText20;	
	
	
	public String getCustText01() {
		return custText01;
	}


	public void setCustText01(String custText01) {
		this.custText01 = custText01;
	}


	public String getCustText02() {
		return custText02;
	}


	public void setCustText02(String custText02) {
		this.custText02 = custText02;
	}


	public String getCustText03() {
		return custText03;
	}


	public void setCustText03(String custText03) {
		this.custText03 = custText03;
	}


	public String getCustText04() {
		return custText04;
	}


	public void setCustText04(String custText04) {
		this.custText04 = custText04;
	}


	public String getCustText05() {
		return custText05;
	}


	public void setCustText05(String custText05) {
		this.custText05 = custText05;
	}


	public String getCustText06() {
		return custText06;
	}


	public void setCustText06(String custText06) {
		this.custText06 = custText06;
	}


	public String getCustText07() {
		return custText07;
	}


	public void setCustText07(String custText07) {
		this.custText07 = custText07;
	}


	public String getCustText08() {
		return custText08;
	}


	public void setCustText08(String custText08) {
		this.custText08 = custText08;
	}


	public String getCustText09() {
		return custText09;
	}


	public void setCustText09(String custText09) {
		this.custText09 = custText09;
	}


	public String getCustText10() {
		return custText10;
	}


	public void setCustText10(String custText10) {
		this.custText10 = custText10;
	}


	public String getCustText11() {
		return custText11;
	}


	public void setCustText11(String custText11) {
		this.custText11 = custText11;
	}


	public String getCustText12() {
		return custText12;
	}


	public void setCustText12(String custText12) {
		this.custText12 = custText12;
	}


	public String getCustText13() {
		return custText13;
	}


	public void setCustText13(String custText13) {
		this.custText13 = custText13;
	}


	public String getCustText14() {
		return custText14;
	}


	public void setCustText14(String custText14) {
		this.custText14 = custText14;
	}


	public String getCustText15() {
		return custText15;
	}


	public void setCustText15(String custText15) {
		this.custText15 = custText15;
	}


	public String getCustText16() {
		return custText16;
	}


	public void setCustText16(String custText16) {
		this.custText16 = custText16;
	}


	public String getCustText17() {
		return custText17;
	}


	public void setCustText17(String custText17) {
		this.custText17 = custText17;
	}


	public String getCustText18() {
		return custText18;
	}


	public void setCustText18(String custText18) {
		this.custText18 = custText18;
	}


	public String getCustText19() {
		return custText19;
	}


	public void setCustText19(String custText19) {
		this.custText19 = custText19;
	}


	public String getCustText20() {
		return custText20;
	}


	public void setCustText20(String custText20) {
		this.custText20 = custText20;
	}


	public Long[] getRoleIds() {
		return roleIds;
	}

	
	public Long[] getOrgIds() {
		return orgIds;
	}


	public void setRoleIds(Long[] roleIds) {
		this.roleIds = roleIds;
	}

	public void setOrgIds(Long[] orgIds) {
		this.orgIds = orgIds;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public Long getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(Long orgCode) {
		this.orgCode = orgCode;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}
	/**
	 * @return user_id
	 */
	public Long getUserId() {
		return userId;
	}

	/**
	 * @param userId
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}

	/**
	 * @return account
	 */
	public String getAccount() {
		return account;
	}

	/**
	 * @param account
	 */
	public void setAccount(String account) {
		this.account = account;
	}

	/**
	 * @return username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return org_id
	 */
	public Long getOrgId() {
		return orgId;
	}

	/**
	 * @param orgId
	 */
	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}

	/**
	 * @return email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return phone
	 */
	public String getPhone() {
		return phone;
	}

	/**
	 * @param phone
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * @return salt
	 */
	public String getSalt() {
		return salt;
	}

	/**
	 * @param salt
	 */
	public void setSalt(String salt) {
		this.salt = salt;
	}

	public String getAvailable() {
		return available;
	}

	public void setAvailable(String available) {
		this.available = available;
	}

	/**
	 * @return create_by
	 */
	public Long getCreateBy() {
		return createBy;
	}

	/**
	 * @param createBy
	 */
	public void setCreateBy(Long createBy) {
		this.createBy = createBy;
	}

	/**
	 * @return last_update_by
	 */
	public Long getLastUpdateBy() {
		return lastUpdateBy;
	}

	/**
	 * @param lastUpdateBy
	 */
	public void setLastUpdateBy(Long lastUpdateBy) {
		this.lastUpdateBy = lastUpdateBy;
	}

	/**
	 * @return create_time
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * @param createTime
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * @return last_update_time
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	/**
	 * @param lastUpdateTime
	 */

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public String getCredentialsSalt() {
		return account + salt;
	}
}